#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QCamera>
#include <QCameraViewfinder>
#include <QCameraImageCapture>
#include <QCameraInfo>

#include <stdlib.h>

#include <QList>
#include <QDebug>
#include <QImage>
#include <QLabel>
#include <QPushButton>
#include <QImage>
#include <QTimer>
#include <QFile>

#include <QTcpSocket>
#include <QTcpServer>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

public slots:
    void ShowTheCapture();
    void SavePicture();
    void displayImage(int, QImage image);
    void Save();
    void Seed();

private:
    Ui::Widget *ui;

private:
    int dx=320,dy=240;
    int state = 0;
    QLabel *collimation = new QLabel(this);
    QCamera *camera;
    QCameraViewfinder *viewfinder;
    QCameraImageCapture *imageCapture;

    QLabel *label = new QLabel;
    QImage image;
    QTimer timer;
    QTimer timer2;

    QTcpSocket *tcpSocket;
    QTcpSocket *tcpSocket2;
    QTcpServer *tcpServer;

};
#endif // WIDGET_H
